<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
	<meta charset="UTF-8">
	<title>出入库记录</title>
	<link type="text/css" rel="stylesheet" href="/fontsawesome/css/font-awesome.css"/>
	<link type="text/css" rel="stylesheet" href="/css/datepicker.css"/>
	<link type="text/css" rel="stylesheet" href="/css/style.css"/>
	<link type="text/css" rel="stylesheet" href="/css/demo.css"/>
</head>
<body>

	<div class="cont_box">
		<table border="0" cellspacing="0" cellpadding="0" class="table" id="table_box">
			<thead>
			<tr>
				<th>活动编号</th>
				<th>活动发起人</th>
				<th>活动发起时间</th>
				<th>操作</th>
			</tr>
			</thead>
			<tbody>
				<tr th:each="t : ${paAct?.items}">
					<td><span th:text="${t.id }"></span></td>
					<td><span th:text="${t.employee.realName }"></span></td>
					<td><span th:text="${#dates.format(t.createTime, 'yyyy-MM-dd')}"></span></td>
					<td th:id="${t.id}">
						<a href="javascript:void(0);" class="table_btn table_info detail_btn">
							<i class="fa fa-eye"></i>
							<span>查看活动详情</span>
						</a>
					</td>
				</tr>
			</tbody>
		</table>
	</div>
	<div class="page-bar titlebtn_box">
		<ul class="page-num-ul clearfix">
			<li th:object="${paAct}">&nbsp;&nbsp;
				<span th:text="|共*{count}条记录|"></span>&nbsp;&nbsp;
				<span th:text="|第*{curr}页 / 共*{total}页|"></span>
			</li>&nbsp;&nbsp;&nbsp;

			<a href="javascript:void(0)" title="首页">
				<i class="fa fa-arrow-circle-o-up"></i>
			</a>&nbsp;
			<a href="javascript:void(0)" title="上一页">
				<i class="fa fa-arrow-circle-o-left"></i>
			</a>&nbsp;
			<a href="javascript:void(0)" title="下一页">
				<i class="fa fa-arrow-circle-o-right"></i>
			</a>&nbsp;
			<a href="javascript:void(0)" title="尾页">
				<i class="fa fa-arrow-circle-o-down"></i>
			</a>
		</ul>
	</div>

<!--javascript include-->
<script src="/js/jquery-2.2.1.min.js"></script>
<script src="/js/jquery.dataTables.min.js"></script>
<script src="/js/jquery.validate.min.js"></script>
<script src="/js/bootstrap-datepicker.js"></script>
<script src="/js/other.js"></script>
<script>

	var curr = [[${paAct?.curr ?: 1}]];
	var total = [[${paAct?.total ?: 0}]];

	if (total == 0){
		$(".page-num-ul a").hide();
	}
	//判断, 是否是第一页
	if(curr == 1){
		$(".page-num-ul a:lt(2)").hide();
	}
	//判断, 是否是最后一页
	if(curr == total){
		$(".page-num-ul a:gt(1)").hide();
	}


	$(".page-num-ul a:eq(0)").bind("click", function() {
		toJump1("/activationRecord/selectList", "startTime=[[${sed.startTime}]]&endTime=[[${sed.endTime}]]" +
				"&timeState=[[${sed.timeState}]]&state=[[${paAct.state}]]&curr=1","#select");

	});
	$(".page-num-ul a:eq(1)").bind("click", function() {
		toJump1("/activationRecord/selectList", "startTime=[[${sed.startTime}]]&endTime=[[${sed.endTime}]]" +
				"&timeState=[[${sed.timeState}]]&state=[[${paAct.state}]]&curr=[[${paAct.curr-1}]]","#select");
	});
	$(".page-num-ul a:eq(2)").bind("click", function() {
		toJump1("/activationRecord/selectList", "startTime=[[${sed.startTime}]]&endTime=[[${sed.endTime}]]" +
				"&timeState=[[${sed.timeState}]]&state=[[${paAct.state}]]&curr=[[${paAct.curr+1}]]","#select");
	});
	$(".page-num-ul a:eq(3)").bind("click", function() {
		toJump1("/activationRecord/selectList", "startTime=[[${sed.startTime}]]&endTime=[[${sed.endTime}]]" +
				"&timeState=[[${sed.timeState}]]&state=[[${paAct.state}]]&curr=[[${paAct.total}]]","#select");
	});


</script>

<script>
	$(function(){
		$("body").tipWindow({method:"edit",Class:".detail_btn",even:"click",orderId:"id",
			Twidth:"600",Theight:"650",tipTit:"活动详情信息",editUrl:"/activationRecord/view"});
	});
</script>
</body>
</html>
